package ae.pcfc.etks.online.common.domain;

import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * TTscClientCategory entity. @author Mohtisham.Salahria
 */
@Entity
@Table(name = "T_TSC_CLIENT_CATEGORY", schema = "TSC_RW", uniqueConstraints = @UniqueConstraint(columnNames = "CT_DESC"))
public class TTscClientCategory implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private String ctId;
	private String ctDesc;
	private String ctDescArb;
	private String ctStatus;
	private String ctCreateduser;
	private Date ctCreatedtime;
	private String ctModifieduser;
	private Date ctModifiedtime;
	private String ctCategoryType;
	private Set<TTscClientCompany> TTscClientCompanies = new HashSet<TTscClientCompany>(0);

	// Constructors

	/** default constructor */
	public TTscClientCategory() {
	}

	/** minimal constructor */
	public TTscClientCategory(String ctDesc, String ctDescArb, String ctStatus, String ctCreateduser, Date ctCreatedtime,
			String ctModifieduser, Date ctModifiedtime, String ctCategoryType) {
		this.ctDesc = ctDesc;
		this.ctDescArb = ctDescArb;
		this.ctStatus = ctStatus;
		this.ctCreateduser = ctCreateduser;
		this.ctCreatedtime = ctCreatedtime;
		this.ctModifieduser = ctModifieduser;
		this.ctModifiedtime = ctModifiedtime;
		this.ctCategoryType = ctCategoryType;
	}

	/** full constructor */
	public TTscClientCategory(String ctDesc, String ctDescArb, String ctStatus, String ctCreateduser, Date ctCreatedtime,
			String ctModifieduser, Date ctModifiedtime, String ctCategoryType, Set<TTscClientCompany> TTscClientCompanies) {
		this.ctDesc = ctDesc;
		this.ctDescArb = ctDescArb;
		this.ctStatus = ctStatus;
		this.ctCreateduser = ctCreateduser;
		this.ctCreatedtime = ctCreatedtime;
		this.ctModifieduser = ctModifieduser;
		this.ctModifiedtime = ctModifiedtime;
		this.TTscClientCompanies = TTscClientCompanies;
		this.ctCategoryType = ctCategoryType;
	}

	// Property accessors
	@Id
	@Column(name = "CT_ID", unique = true, nullable = false, length = 10)
	public String getCtId() {
		return this.ctId;
	}

	public void setCtId(String ctId) {
		this.ctId = ctId;
	}

	@Column(name = "CT_DESC", unique = true, nullable = false, length = 30)
	public String getCtDesc() {
		return this.ctDesc;
	}

	public void setCtDesc(String ctDesc) {
		this.ctDesc = ctDesc;
	}

	@Column(name = "CT_DESC_ARB", nullable = false, length = 30)
	public String getCtDescArb() {
		return this.ctDescArb;
	}

	public void setCtDescArb(String ctDescArb) {
		this.ctDescArb = ctDescArb;
	}

	@Column(name = "CT_STATUS", nullable = false, length = 1)
	public String getCtStatus() {
		return this.ctStatus;
	}

	public void setCtStatus(String ctStatus) {
		this.ctStatus = ctStatus;
	}

	@Column(name = "CT_CREATEDUSER", nullable = false, length = 30)
	public String getCtCreateduser() {
		return this.ctCreateduser;
	}

	public void setCtCreateduser(String ctCreateduser) {
		this.ctCreateduser = ctCreateduser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CT_CREATEDTIME", nullable = false, length = 7)
	public Date getCtCreatedtime() {
		return this.ctCreatedtime;
	}

	public void setCtCreatedtime(Date ctCreatedtime) {
		this.ctCreatedtime = ctCreatedtime;
	}

	@Column(name = "CT_MODIFIEDUSER", nullable = false, length = 30)
	public String getCtModifieduser() {
		return this.ctModifieduser;
	}

	public void setCtModifieduser(String ctModifieduser) {
		this.ctModifieduser = ctModifieduser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CT_MODIFIEDTIME", nullable = false, length = 7)
	public Date getCtModifiedtime() {
		return this.ctModifiedtime;
	}

	public void setCtModifiedtime(Date ctModifiedtime) {
		this.ctModifiedtime = ctModifiedtime;
	}

	@Column(name = "CT_CATEGORY_TYPE", length = 1)
	public String getCtCategoryType() {
		return ctCategoryType;
	}

	public void setCtCategoryType(String ctCategoryType) {
		this.ctCategoryType = ctCategoryType;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TTscClientCategory")
	public Set<TTscClientCompany> getTTscClientCompanies() {
		return this.TTscClientCompanies;
	}

	public void setTTscClientCompanies(Set<TTscClientCompany> TTscClientCompanies) {
		this.TTscClientCompanies = TTscClientCompanies;
	}

}